{{extend './_layouts/home.html'}}

{{block 'title'}}{{'交换生 - 首页'}}{{/block}}
{{block 'head'}}
<link href="/public/css/main.css" rel="stylesheet">
<style>
.col-md-offset-2 {
    margin-left: 16.66666667%;
    top: -220px
}
</style>
{{/block}}
{{block 'body'}}
<section class="container">
  <div class="container-fluid">
    <div class="row">
      <div class="col-sm-3 col-md-2 sidebar">
        <ul class="nav nav-sidebar">
          <li><a href="/">管理员<span class="sr-only">(current)</span></a></li>
          <li><a href="/">院校</a></li>
          <li><a href="/">交换生</a></li>
          <li><a href="/">第三方评估</a></li>
          <li class="active"><a href="/translate">翻译机构</a></li>
        </ul>
      </div>
      <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">

        <h2 class="sub-header">翻译机构</h2>
        <a class="btn btn-success" href="/new-lan">添加语种</a>
        <div class="table-responsive">
          <table class="table table-striped">
            <thead>
              <tr>
                <th>#</th>
                <th>语种名称</th>
                <th>课程时间</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody class="list">
              {{ each languages }}
              <tr>
                  <td>{{ $index+1 }}</td>
                  <td>{{ $value.name }}</td>
                  <td>{{ $value.time}}</td>
                  <td>
                    <a href="/https://fanyi.baidu.com/?aldtype=16047#auto/zh">翻译</a>
                    <a href="" class="peixun">申请培训</a>
                  </td>
                </tr>
              {{ /each}}     
            </tbody>
          </table>
        </div>
          </div>
      </div>
    </div>
  </div>
  {{block 'script'}}
  <script>

  var pei = document.querySelectorAll('.peixun')
  for(var i = 0; i < pei.length; i++) {
    pei[i].onclick=function() {
      window.alert('申请培训成功')
    }
  }
  </script>
  {{/block}}
</section>
{{/block}}
